Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2022 11 add sia405 to kek export #84

Merged
merged 42 commits into from
Mar 9, 2023

Conversation

sjib
Copy link
Contributor

@sjib sjib commented Nov 26, 2022

No description provided.

sjib added 7 commits November 26, 2022 19:41
if export_model_name = SIA405_ABWASSER_2015_LV95 then export as export_model_name (SIA405_ABWASSER_2015_LV95), else export as model_name (KEK_2019_LV95)
- Added ABWASSER_ILI_EXPORT_MODEL and Added ABWASSER_ILI_EXPORT_MODEL_NAME to config
Error: line 16: SIA405_ABWASSER_2015_LV95.SIA405_Abwasser.Spezialbauwerk: tid ch080qwzAW001080: unknown property <Art>
<SIA405_ABWASSER_2015_LV95.SIA405_Abwasser.Abwasserknoten TID="ch080qwzAK001099">
@sjib
Copy link
Contributor Author

sjib commented Nov 28, 2022

@olivierdalang:

  • Should the testdata be correct or is there a reason to have invalid testdata set case_c_import_all and case_a_import_from_wincan? qgepqwat2ili/data/test_data/
  • Shall I correct the testdata sets?

sjib added 2 commits November 28, 2022 17:18
- renamed old version with errors to case_c_import_all_with_errors
- additional parameter export_model_name needed in function calls utils.ili2db.export_xtf_data ()
@sjib
Copy link
Contributor Author

sjib commented Nov 28, 2022

ERROR: test_case_b_export_complete_qgep_to_xtf (qgepqwat2ili.tests.test_qgep.TestQGEPUseCases)
B. export the whole QGEP model to interlis

Traceback (most recent call last):
File "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/tests/test_qgep.py", line 87, in test_case_b_export_complete_qgep_to_xtf
main(["qgep", "export", path, "--recreate_schema"])
File "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/init.py", line 138, in main
utils.ili2db.export_xtf_data(SCHEMA, ILI_MODEL_NAME, args.path, make_log_path(log_path, "iliexport"))
TypeError: export_xtf_data() missing 1 required positional argument: 'log_path'

@sjib
Copy link
Contributor Author

sjib commented Dec 23, 2022

20221223_test_case_e_export_selection_assertion_error

@olivierdalang Is their a way to look at the created "export.xtf" of this testexport to find out how much data was exported?

@sjib sjib requested a review from olivierdalang January 12, 2023 19:11
@sjib
Copy link
Contributor Author

sjib commented Jan 12, 2023

@olivierdalang I found the solution to the failing test with self.assertEqual:
The bid is different in the two files - so I needed to make two variants of find_all_xml.

Please review and if it would be better to make an entry in the config to not have model related information in the testdata code please make a suggestion how to adapt and how to import config in test_qgep.py
Thanks

@sjib sjib changed the title [WIP] 2022 11 add sia405 to kek export 2022 11 add sia405 to kek export Jan 12, 2023
@ponceta ponceta added this to the 2023.0 milestone Feb 22, 2023
Copy link
Collaborator

@olivierdalang olivierdalang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One main question : export_xtf_data's new export_model_name argument, that involves many changes in the PR, seems completely unused ?

Otherwise mostly code style thing (removing useless comments / debug statements).

for line in Lines:
count += 1
logger.warning("Line{}: {}".format(count, line.strip()))

root = ET.parse(path)

This comment was marked as resolved.

@olivierdalang olivierdalang requested review from olivierdalang and removed request for olivierdalang March 9, 2023 15:13
@olivierdalang
Copy link
Collaborator

@sjib Ok made my changes, from the tests it seems to work. Can you double check ?

@sjib
Copy link
Contributor Author

sjib commented Mar 9, 2023

I only get one file (VSA_KEK) and not two files (VSA_KEK and SIA405 Abwasser) as expected now
20230309_qgep-export_test_adaption_OD_add_sia405_abwasser_pullrequest.xtf.zip

@olivierdalang
Copy link
Collaborator

@sjib I just manually tested, and ran into an error in which you would have ran as well, so I'm not sure you tested the correct version ? Can you try again with the latest changes, which exports both files successfully here (just tested). Just make sure to pull the latest changes of the submodule, and are on master on the plugin, then also make sure to restart QGIS (under certain circumstances, the plugin reloader may not reload the qgepqwat2ili submodule propertly)

@sjib
Copy link
Contributor Author

sjib commented Mar 9, 2023

Now i get also 2 files as expected.
20230309_qgep-export_test_adaption_OD_add_sia405_abwasser_pullrequest2.xtf.zip

@olivierdalang
Copy link
Collaborator

Ok so it behaves as expected ? Ok for merge ?

@sjib
Copy link
Contributor Author

sjib commented Mar 9, 2023

@olivierdalang Yes, ok for merge! Thanks for all support.

@olivierdalang olivierdalang merged commit 98c50b0 into master Mar 9, 2023
@olivierdalang olivierdalang deleted the 2022-11-add-sia405-to-kek-export branch March 9, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants